﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using NetSysData;


namespace BladeTecWebApplication.Admin
{
    public partial class AddQuestionLevel : System.Web.UI.Page
    {

        //Add a newquestionlevel object to data layer
        NetSysData.NetSysData data = new NetSysData.NetSysData();
        QUESTION_LEVEL newQuestionLevel = new QUESTION_LEVEL();

        protected void Page_Load(object sender, EventArgs e)
        {



         }
           

        protected void btnAddQuestionLevel_Click(object sender, EventArgs e)
        {

            //retrieve form information
            newQuestionLevel.LEVEL_DESCRIPTION = txtlevelDescription.Text;
			try
			{
				newQuestionLevel.LEVEL_WEIGHT = Decimal.Parse(txtlevelWeight.Text);
			}
			catch (Exception)
			{
				pnlNumericError.Visible = true;
				return;
			}

            //passes form information to data layer
            data.addQuestionLevel(newQuestionLevel);

            pnlQuestionLevelForm.Visible = false;
            pnlConfirmationForm.Visible = true;
            
        }


    }

}